// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_hm_securityranges
// * CreateDate    : 2014-06-05 18:30:01
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:01
// * LastChanger   : 2014-06-05 18:30:01
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class HmSecurityrangesEntity : EntityBase
    {
        public HmSecurityrangesTable TableSchema
        {
            get
            {
                return HmSecurityrangesTable.Current;
            }
		}
		
		public HmSecurityrangesEntity()
        {

        }
		
		public HmSecurityrangesEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Rangeid = Convert.ToInt32(CommonFunctions.ToObject(dr["rangeid"]));
			this.Rangepriorityid = Convert.ToInt32(CommonFunctions.ToObject(dr["rangepriorityid"]));
			this.Rangelowerip1 = Convert.ToInt64(CommonFunctions.ToObject(dr["rangelowerip1"]));
			this.Rangelowerip2 = Convert.ToInt64(CommonFunctions.ToObject(dr["rangelowerip2"]));
			this.Rangeupperip1 = Convert.ToInt64(CommonFunctions.ToObject(dr["rangeupperip1"]));
			this.Rangeupperip2 = Convert.ToInt64(CommonFunctions.ToObject(dr["rangeupperip2"]));
			this.Rangeoptions = Convert.ToInt32(CommonFunctions.ToObject(dr["rangeoptions"]));
			this.Rangename = Convert.ToString(CommonFunctions.ToObject(dr["rangename"]));
			this.Rangeexpires = Convert.ToByte(CommonFunctions.ToObject(dr["rangeexpires"]));
			this.Rangeexpirestime = Convert.ToDateTime(CommonFunctions.ToObject(dr["rangeexpirestime"]));
        }
		
		public HmSecurityrangesEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Rangeid = Convert.ToInt32(CommonFunctions.ToObject(dr["rangeid"]));
			this.Rangepriorityid = Convert.ToInt32(CommonFunctions.ToObject(dr["rangepriorityid"]));
			this.Rangelowerip1 = Convert.ToInt64(CommonFunctions.ToObject(dr["rangelowerip1"]));
			this.Rangelowerip2 = Convert.ToInt64(CommonFunctions.ToObject(dr["rangelowerip2"]));
			this.Rangeupperip1 = Convert.ToInt64(CommonFunctions.ToObject(dr["rangeupperip1"]));
			this.Rangeupperip2 = Convert.ToInt64(CommonFunctions.ToObject(dr["rangeupperip2"]));
			this.Rangeoptions = Convert.ToInt32(CommonFunctions.ToObject(dr["rangeoptions"]));
			this.Rangename = Convert.ToString(CommonFunctions.ToObject(dr["rangename"]));
			this.Rangeexpires = Convert.ToByte(CommonFunctions.ToObject(dr["rangeexpires"]));
			this.Rangeexpirestime = Convert.ToDateTime(CommonFunctions.ToObject(dr["rangeexpirestime"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return HmSecurityrangesTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public int Rangeid
        {
            get { return Convert.ToInt32(GetData(HmSecurityrangesTable.C_rangeid)); }
            set { SetData(HmSecurityrangesTable.C_rangeid, value); }
        }
		
        [DataMember]
        public int Rangepriorityid
        {
            get { return Convert.ToInt32(GetData(HmSecurityrangesTable.C_rangepriorityid)); }
            set { SetData(HmSecurityrangesTable.C_rangepriorityid, value); }
        }
		
        [DataMember]
        public long Rangelowerip1
        {
            get { return Convert.ToInt64(GetData(HmSecurityrangesTable.C_rangelowerip1)); }
            set { SetData(HmSecurityrangesTable.C_rangelowerip1, value); }
        }
		
        [DataMember]
        public long Rangelowerip2
        {
            get { return Convert.ToInt64(GetData(HmSecurityrangesTable.C_rangelowerip2)); }
            set { SetData(HmSecurityrangesTable.C_rangelowerip2, value); }
        }
		
        [DataMember]
        public long Rangeupperip1
        {
            get { return Convert.ToInt64(GetData(HmSecurityrangesTable.C_rangeupperip1)); }
            set { SetData(HmSecurityrangesTable.C_rangeupperip1, value); }
        }
		
        [DataMember]
        public long Rangeupperip2
        {
            get { return Convert.ToInt64(GetData(HmSecurityrangesTable.C_rangeupperip2)); }
            set { SetData(HmSecurityrangesTable.C_rangeupperip2, value); }
        }
		
        [DataMember]
        public int Rangeoptions
        {
            get { return Convert.ToInt32(GetData(HmSecurityrangesTable.C_rangeoptions)); }
            set { SetData(HmSecurityrangesTable.C_rangeoptions, value); }
        }
		
        [DataMember]
        public string Rangename
        {
            get { return Convert.ToString(GetData(HmSecurityrangesTable.C_rangename)); }
            set { SetData(HmSecurityrangesTable.C_rangename, value); }
        }
		
        [DataMember]
        public byte Rangeexpires
        {
            get { return Convert.ToByte(GetData(HmSecurityrangesTable.C_rangeexpires)); }
            set { SetData(HmSecurityrangesTable.C_rangeexpires, value); }
        }
		
        [DataMember]
        public DateTime Rangeexpirestime
        {
            get { return Convert.ToDateTime(GetData(HmSecurityrangesTable.C_rangeexpirestime)); }
            set { SetData(HmSecurityrangesTable.C_rangeexpirestime, value); }
        }
		
		#endregion
	}
	
	
}	

